Skip to content

Add regression test BSP, build scripts, and CI for RV32/RV64#526

Open
akifejaz wants to merge 1 commit into
eclipse-threadx:devfrom
akifejaz:dev
Open

Add regression test BSP, build scripts, and CI for RV32/RV64#526
akifejaz wants to merge 1 commit into
eclipse-threadx:devfrom
akifejaz:dev

Conversation

@akifejaz
Copy link
Copy Markdown
Contributor

Adds QEMU-virt BSP and regression test infrastructure for RISC-V 32/64-bit ports.

  • QEMU-virt board support package (CLINT timer, PLIC, UART, trap handler, linker script)
  • Build/test scripts (run.sh, build_tx_riscv.sh, test_tx_riscv.sh) running 5 configs × 2 architectures (950 tests)
  • CI integration via regression_test.yml using xPack toolchain + QEMU
  • Fix 64-bit portability issues in regression tests: block/byte pool sizes, byte pool search pointer offset, timing tolerance, -Wconversion in trace code

All regression tests passes for RV32/RV64, please see the pipeline status here

@akifejaz akifejaz marked this pull request as ready for review April 28, 2026 12:18
@fdesbiens fdesbiens self-assigned this Apr 28, 2026
@fdesbiens fdesbiens moved this to In review in ThreadX Roadmap Apr 28, 2026
@fdesbiens fdesbiens self-requested a review May 11, 2026 14:58
Comment thread test/tx/cmake/riscv/bsp/plic.c
Comment thread test/tx/cmake/riscv/bsp/plic.c
@fdesbiens
Copy link
Copy Markdown
Contributor

@akifejaz I reviewed the PR and everything looks good. Please add the two small comments above on the PLIC, and we should be good to go!

@akifejaz akifejaz force-pushed the dev branch 2 times, most recently from 1e2ff96 to c3b2e3e Compare May 15, 2026 06:56
Add a QEMU virt-machine BSP and CTest infrastructure to run the
ThreadX regression suite on both RISC-V 32-bit and 64-bit targets
in CI.

New components:
- BSP (entry, trap, PLIC, CLINT timer, UART, linker script) targeting
  QEMU virt machine for RV32 and RV64
- CMake build system with Ninja, supporting multiple build configs
- CI scripts: install_riscv.sh (toolchain + QEMU), build_tx_riscv.sh,
  test_tx_riscv.sh
- GitHub Actions workflow job for RISC-V regression gating

Port fixes:
- RV32 tx_thread_context_restore.S: set MPIE alongside MPP (0x1800 →
  0x1880) so mret re-enables interrupts
- RV32/RV64 tx_port.h: add TX_REGRESSION_TEST extension macros needed
  by the test harness
- RV32/RV64 example_build scripts: add compile and QEMU launch steps

Regression test portability fixes:
- Block memory tests: increase pool sizes (320 → 340) to accommodate
  larger RISC-V block-header alignment
- Byte memory test: replace hardcoded offsets with BYTE_POOL_OVERHEAD
  macro for portable pool-size computation
- Event flag timeout test: make counter tolerance unconditional,
  removing linux-only guard

Signed-off-by: Akif Ejaz <akif.ejaz@10xengineers.ai>
@akifejaz
Copy link
Copy Markdown
Contributor Author

akifejaz commented May 15, 2026

@akifejaz I reviewed the PR and everything looks good. Please add the two small comments above on the PLIC, and we should be good to go!

Thank you for the review, I've updated the PR as per your comments. PR is ready from myside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants